package nb.diskfilesystem.controller;

import javafx.fxml.FXML;
import javafx.scene.control.TreeView;
import javafx.scene.layout.BorderPane;
import nb.diskfilesystem.model.DirectoryTree;
import nb.diskfilesystem.model.FAT;
import nb.diskfilesystem.ui.FileContextMenu;
import nb.diskfilesystem.ui.MainView;

public class MainController {

    @FXML
    private TreeView<String> catalog;
    @FXML
    private DirectoryTree directoryTree;

    @FXML
    private BorderPane root;

    @FXML
    public void initialize() {

        MainView.rootNode=root;
        MainView mainView = new MainView();
        directoryTree = new DirectoryTree(catalog);
        FileContextMenu fileContextMenu = new FileContextMenu(directoryTree);//创建菜单
        fileContextMenu.init();
        FAT fat = new FAT();
        fat.start();
        FileSystemController fileSystemController = new FileSystemController(fileContextMenu);
        directoryTree.initializeTree();

        //catalog.getStyleClass().add("treeview");
    }
}